<template>
  <div>
    <!-- //搜索框 -->
    <el-form :inline="true" :model="formData" class="demo-form-inline" style="margin-bottom:30px">
      <div style="float:left" id="bigbox">
        <el-form-item label="任务名称" style="float:left">
          <el-input v-model="formData.misson" placeholder="请输入"></el-input>
        </el-form-item>
        <el-form-item label="创建日期" style="float:left">
          <el-col :span="20">
            <el-date-picker
              type="date"
              placeholder="请选择"
              v-model="formData.date1"
              style="width: 100%;"
            ></el-date-picker>
          </el-col>
        </el-form-item>
        <el-form-item style="float:left">
          <el-button type="primary" @click="onSubmit">查询</el-button>
          <el-button>重置</el-button>
        </el-form-item>
      </div>
    </el-form>
    <!-- 表格 -->
    <div id="secbox">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column fixed type="index" label="序号"></el-table-column>
        <el-table-column prop="taskName" label="任务名称"></el-table-column>
        <el-table-column prop="finishDate" label="完成日期"></el-table-column>
        <el-table-column prop="fileDate" label="归档日期"></el-table-column>
        <el-table-column fixed="right" label="操作">
          <template slot-scope="scope">
            <el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button>
            <el-button @click="handleClick(scope.add)" type="text" size="small">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>

    <!-- 分页 -->
    <el-pagination background layout="prev, pager, next" :total="15" style="margin-top:30px"></el-pagination>
  </div>
</template>

<script>
// import api from "../../../utils/api";
export default {
  data() {
    return {
    
      tableData: [
        {
          id: "",
          taskName: "",
          createDate: "",
          endDate: "",
          createEmpName: "",
          leaderEmpName: "",
          createBy: "",
          leader: "",
          status: "",
          finishDate: "",
          fileDate: ""
        }
      ],
      formData: {
        createDate: "",
        createEmpName: "",
        currentPage: 1,
        employeeId: 1,
        fileDate: "",
        finishDate: "",
        leaderEmpName: "",
        pageSize: 5,
        status: 1,
        taskName: ""
      }
    };
  },
  methods: {
    respost() {
      this.$axios({
        url: "http://47.100.30.12:8080/task/filed/selectForPageLike",
        method: "post",
        data: {
          ...this.formData
        }
      }).then(res => {
        if (res.data.code == 200) {
          this.tableData = res.data.data;
        }
        console.log(res);
      });
    },
    handleClick(row) {
      console.log(row);
    },
    onSubmit() {
      console.log("submit!");
    }
  },
  created() {},
  mounted() {
    this.respost();
  },
  computed: {}
};
</script>

<style scoped lang="less">
</style>

